import request from "@/router/axios";

/**
 * 文件流返回
 * @param url 接口地址
 */
export const exportBlob = (url) => {
  return request({
    url: url,
    method: 'get',
    responseType: 'blob'
  })
}

/**
 * 文件上传
 * @param file 文件
 */
export const upload = (file) => {
  return request({
    url: '/api/server-resource/admin/oss/put/file',
    method: 'post',
    data: file,
    headers:{
      'Content-Type': 'multipart/form-data'
    }
  })
}
